package com.demo.bookstore.test.data.util;

import com.demo.bookstore.model.BookEntity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

@SpringBootTest
@RunWith(SpringRunner.class)
public class CreateTable {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Test
    public void createTable_tb_book(){
        jdbcTemplate.execute("create table if not exists tb_book1(id SERIAL NOT NULL PRIMARY KEY, name varchar not null, classification varchar, description varchar, publish_date timestamp not null)");
    }


}
